<%--
  Created by IntelliJ IDEA.
  User: Yao bo
  Date: 2019/1/23
  Time: 11:00
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" href="layuiadmin/layui/css/layui.css">
    <script src="My97DatePicker/WdatePicker.js"></script>
    <script src="js/jquery.min.3.1.0.js"></script>
</head>
<body>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
    <legend>收获地址修改</legend>
</fieldset>
<form id="formse" class="layui-form" action="../dress">
    <div class="layui-form-item">
        <label class="layui-form-label">收获地址id</label>
        <div class="layui-input-inline">
            <input type="text" name="Id" required lay-verify="required" autocomplete="off" class="layui-input" value="${me.harve_Id}" readonly="readonly">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">所在地区</label>
        <div class="layui-input-block">
            <input type="text" name="Region" required  lay-verify="required" autocomplete="off" class="layui-input" value="${me.harve_Region}">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">详细地址</label>
        <div class="layui-input-block">
            <input type="text" name="Address" required  lay-verify="required" autocomplete="off" class="layui-input" value="${me.harve_Address}">
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="formDemo" type="submit">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
<script src="layuiadmin/layui/layui.js"></script>
<script>
    form.on('submit(formDemo)', function(data){

        var index = parent.layer.getFrameIndex(window.name);

        $.ajax({
            url:"../dress",   //请求路径
            datatype:"json",//返回的格式
            data:$("#formse").serialize(), //参数
            type:"POST", //什么请求
            success:function (data) { //请求成功以后
                //AJAX成功以后返回的
                var obj = eval('(' + data + ')');
                layer.msg(obj.message);
                //延时500ms关闭窗口
                setTimeout(function () {
                    parent.layer.close(index);
                }, 500);
            }
        });
        return false;
    });
</script>
</body>
</html>
